package com.kould.common.base;

import com.baomidou.mybatisplus.annotation.*;
import com.google.gson.annotations.JsonAdapter;
import com.kould.common.adapter.IdAdapter;
import com.kould.common.adapter.TimeAdapter;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
public class BasePO implements Serializable {

    private static final long serialVersionUID = -4454737432550239378L;

    @TableId(type = IdType.NONE)
    @JsonAdapter(IdAdapter.class)
    private Long id ;
    @TableField(fill = FieldFill.INSERT)
    @JsonAdapter(TimeAdapter.class)
    private Date createTime ;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonAdapter(TimeAdapter.class)
    private Date updateTime ;
    @TableLogic
    private Integer deleted ;
}
